package com.work.tz.service.impl;

import com.work.tz.mapper.TaskTmplMapper;
import com.work.tz.model.TaskTmpl;
import com.work.tz.service.TaskDelService;
import com.work.tz.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TaskServiceImpl implements TaskService {

    @Autowired
    private TaskTmplMapper taskTmplMapper;

    @Autowired
    private TaskDelService taskDelService;


    @Override
    @Transactional
    public void saveTask(TaskTmpl task) {
        taskTmplMapper.insertSelective(task);
        taskDelService.saveTaskDel(task);

    }
}
